toastr.options = {
  "closeButton": false,
  "debug": false,
  "newestOnTop": true,
  "progressBar": false,
  "positionClass": "toast-center-center",
  "preventDuplicates": false,
  "onclick": null,
  "showDuration": "300",
  "hideDuration": "1000",
  "timeOut": "1000",
  "extendedTimeOut": "3000",
  "showEasing": "swing",
  "hideEasing": "linear",
  "showMethod": "fadeIn",
  "hideMethod": "fadeOut",
}
function searchFun () {
  let cardId = $('input[data-fn="cardId"]').val();
  if (cardId!='') {
    $.ajax({
      url: '/searchcases/search',
      type: 'post',
      data: {
        // cardId: '342901199901102822',
        cardId: cardId,
        token: $('input[data-fn="settoken"]').val()
      },
      success: function (res) {
        if (res.code === 200) {
          $('.dataContent').css('display', 'inline-block');
          $('.case_number').html(res.data.length);
          let htl = '';
          res.data.forEach(data => {
            htl += `
            <tr>
              <td>${data.mediationNum}</td>
              <td>${data.assetsName}</td>
              <td>${data.litigantName}</td>
              <td>${data.disputeType}</td>
              <td>${data.debtTotal}</td>
              <td><i class=${data.status==='已撤案'?'success':'error'}></i>${data.status}</td>
            </tr>
            `
          })
          $('#data_tbody').append(htl);
        } else {
          toastr.info(res.message);
        }
      },
      error: function (error) {
        toastr.info(error);
      }
    })
  } else {
    toastr.info('请输入证件号码');
  }
};
